package com.yn.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 车队类型枚举
 */
@AllArgsConstructor
@Getter
public enum CarFleetTypeEnum {

	PERSONAL(1, "个人"),

	CAR_FLEET(2, "车队"),

	;

	private Integer code;

	private String name;

	public static CarFleetTypeEnum getByCode(Integer code) {
		if(null == code) {
			return null;
		}
		for(CarFleetTypeEnum carFleetTypeEnum : CarFleetTypeEnum.values()) {
			if(carFleetTypeEnum.getCode() == code) {
				return carFleetTypeEnum;
			}
		}
		return null;
	}

}
